# -- Blazon Makefile --
#
# make          - 
# make blazon   - makes the daemon
# make clean    - cleans up the object and binary files

.PHONY: blazon clean


# gcc option: -Wall
CFLAGS=-O0 -ggdb3 -c -Wall

.if !exists(config.status)
.error Run ./configure before calling make.
.endif


blazon:	blazon.o log.o io.o config.o match.o tools.o hash.o \
		event.o base-io.o
	gcc -lm -O0 -ggdb3 -g3 blazon.o log.o io.o config.o match.o \
		tools.o hash.o event.o base-io.o -o blazon

blazon.o:	blazon.c
	gcc $(CFLAGS) blazon.c -o blazon.o

log.o:	log.c
	gcc $(CFLAGS) log.c -o log.o

io.o:	io.c
	gcc $(CFLAGS) io.c -o io.o

config.o:	config.c
	gcc $(CFLAGS) config.c -o config.o

match.o:	match.c
	gcc $(CFLAGS) match.c -o match.o

tools.o:	tools.c
	gcc $(CFLAGS) tools.c -o tools.o

hash.o:	hash.c
	gcc $(CFLAGS) hash.c -o hash.o

event.o:	event.c
	gcc $(CFLAGS) event.c -o event.o

base-io.o:	base-io.c
	gcc $(CFLAGS) base-io.c -o base-io.o

clean:
	rm -f *.o blazon

distclean:
	rm -f config.log config.status
	rm -fr autom4te.cache 
